package com.uit.trip_;

import java.util.List;

import com.uit.trip_.models.LocationModel;
import com.uit.trip_.models.Trip;
import com.uit.trip_.models.User;

import android.app.Application;

public class TripApplication extends Application {

	public static final int TYPE_HOME = 0;
	public static final int TYPE_LOCATION = 1;
	public static final int TYPE_SEARCH = 2;

	private List<Trip> tripList;
	private List<Trip> tripListSearch;
	private User user;
	private LocationModel myLocation;

	public List<Trip> getTripList(int type) {
		switch (type) {
		case TYPE_HOME:
			return tripList;
		case TYPE_SEARCH:
			return tripListSearch;
		default:
			break;
		}
		return tripList;
	}

	public void setTripList(List<Trip> _tripList, int type) {
		switch (type) {
		case TYPE_HOME:
			this.tripList = _tripList;
			break;
		case TYPE_SEARCH:
			this.tripListSearch = _tripList;
			break;
		default:
			break;
		}
		this.tripList = _tripList;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User _user) {
		this.user = _user;
	}

	public void setLocation(LocationModel location) {
		this.myLocation = location;
	}

	public LocationModel getLocation() {
		return myLocation;
	}
}
